package com.geekchique.runningbuddy.model;

import android.location.Location;

public class CommonGeoLocation {

	public String	name;
	public int		id;
	public String	countryCode;
	public double	latitude;
	public double	longtiude;
	public double	altitude;
	public String	address1;
	public String	address2;
	public String	postcode;

	public CommonGeoLocation(int id, String name, double latitude, double longtiude, double altitude, String address1,
			String address2, String postcode, String countryCode) {
		this.id = id;
		this.name = name;
		this.latitude = latitude;
		this.longtiude = longtiude;
		this.altitude = altitude;
		this.address1 = address1;
		this.address2 = address2;
		this.postcode = postcode;
		this.countryCode = countryCode;
	}

	public CommonGeoLocation(Location loc) {
		this.latitude = loc.getLatitude();
		this.longtiude = loc.getLongitude();
		this.altitude = loc.getAltitude();
	}

	public Location getLocation() {
		Location location = new Location();
		location.setAltitude(this.altitude);
		location.setLongitude(this.longtiude);
		location.setLatitude(this.latitude);
		return location;
	}

}
